import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;



public class Main {
	
	public static void main(String[] args){
		
		 BufferedWriter wr;
		 try {
//			 File input = new File("./src/file/Nokia_N8-00.pdf");
//			 File input = new File("./src/file/Addison Wesley - Design Patterns, Elements Of Reusable Object Oriented Software.pdf");
//			 File input = new File("./src/file/Attribute-Driven Design (ADD) v2.pdf");
//	         File input = new File("./src/file/Resumen de Mak.pdf");  // The PDF file from where you would like to extract
			 File input = new File("./src/file/IBM.pdf");  // The PDF file from where you would like to extract
	         File output = new File("D:\\lenguajes.txt"); // The text file where you are going to store the extracted data
	         Documento documento = new Documento();
	         documento.parserDocumento(input);
	         String text = documento.readDocument();
	         System.out.println(text);
	         System.out.println( "Fin " );
	         
	       	        
	         FileOutputStream out = new FileOutputStream(output);
	         OutputStreamWriter outStream = new OutputStreamWriter(out);
	         wr = new BufferedWriter(outStream);
	         wr.write(text);
	        
		 }catch(Exception e){
			 
		 }
	}
}

	   

